﻿using FriendStar.Code;
using FriendStar.Domain.Entity.VBaseData;
using FriendStar.Domain.IRepository.VBaseData;
using FriendStar.Repository.VBaseData;
using System.Collections.Generic;
using System.Linq;
using SqlSugarRepository;

namespace FriendStar.Application.VBaseData
{
    public class V_CPK_41_ML_StoCPKConAccoApp
    {
        private IV_CPK_41_ML_StoCPKConAccoRepository service = new V_CPK_41_ML_StoCPKConAccoRepository();

        public List<V_CPK_41_ML_StoCPKConAccoEntity> GetList()
        {
            return service.IQueryable().ToList();
        }
        public V_CPK_41_ML_StoCPKConAccoEntity GetForm(string keyValue)
        {
            return service.FindEntity(keyValue);
        }
        public void DeleteForm(string keyValue)
        {

        }
        public void SubmitForm(V_CPK_41_ML_StoCPKConAccoEntity V_CPK_41_ML_StoCPKConAccoEntity, string keyValue)
        {
            if (!string.IsNullOrEmpty(keyValue))
            {
                service.Update(V_CPK_41_ML_StoCPKConAccoEntity);
            }
            else
            {
                service.Insert(V_CPK_41_ML_StoCPKConAccoEntity);
            }
        }
    }
}
